<template>
    <div class="student-menu p-1 bg-fff d-flex mb-1 between border-radius">
        <div>
            <span class="mr-1">进入课堂:</span>
            <Input placeholder="请输入课堂编号" class="mr-1 w-200" v-model="lid"></Input>
            <Button type="primary" @click="lid&&$router.push({path:'/s/join_lesson',query:{lid}})">进入</Button>
        </div>
        <div>
            <Button :ghost="activeClass===0" :type="activeClass===0?'primary':'default'" @click="$router.push('center')">个人中心</Button>
            <Button :ghost="activeClass===1" :type="activeClass===1?'primary':'default'" @click="$router.push('schoolwork_list')" class="ml-1">我的作业</Button>
            <Button :ghost="activeClass===2" :type="activeClass===2?'primary':'default'" @click="$router.push('questions_list')" class="ml-1">提问列表</Button>
            <Button @click="logout" class="ml-1">退出登录</Button>
        </div>
    </div>
</template>

<script>
export default {
    data(){
        return {
            lid:'',
            activeClass:-1,
        }
    },
    methods:{
        logout(){
            this.$Modal.confirm({
                title: '退出',
                content: '退出当前账号吗',
                onOk: () => {
                    localStorage.clear()
                    this.$router.push({path:'/'})
                },
            });
            
        },
    },
}
</script>